<!DOCTYPE html>
<html><head>
	    <meta charset="utf-8">
    <title>ThinkPHP5.0</title>

    <meta name="description" content="Dashboard">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--Basic Styles-->
    <link href="__ADMIN__/style/bootstrap.css" rel="stylesheet">
    <link href="__ADMIN__/style/font-awesome.css" rel="stylesheet">
    <link href="__ADMIN__/style/weather-icons.css" rel="stylesheet">

    <!--Beyond styles-->
    <link id="beyond-link" href="__ADMIN__/style/beyond.css" rel="stylesheet" type="text/css">
    <link href="__ADMIN__/style/demo.css" rel="stylesheet">
    <link href="__ADMIN__/style/typicons.css" rel="stylesheet">
    <link href="__ADMIN__/style/animate.css" rel="stylesheet">
    
</head>
<body>
	<!-- 头部 -->
    {include file="common/head"}
	<!-- /头部 -->
	
	<div class="main-container container-fluid">
		<div class="page-container">
			<!-- Page Sidebar -->
                {include file="common/left"}
            <!-- /Page Sidebar -->
            <!-- Page Content -->
            <div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-breadcrumbs">
                    <ul class="breadcrumb">
                                        <li>
                        <a href="#">系统</a>
                    </li>
                                        <li>
                        <a href="{:url('ModelFields/lst')}">字段管理</a>
                    </li>
                                        <li class="active">修改字段</li>
                                        </ul>
                </div>
                <!-- /Page Breadcrumb -->

                <!-- Page Body -->
                <div class="page-body">
                    
<div class="row">
    <div class="col-lg-12 col-sm-12 col-xs-12">
        <div class="widget">
            <div class="widget-header bordered-bottom bordered-blue">
                <span class="widget-caption">修改字段</span>
            </div>
            <div class="widget-body">
                <div id="horizontal-form">
                    <form class="form-horizontal" role="form" action="" method="post">
                        <input type="hidden" name="id" value="{$modelFields.id}">
                        <div class="form-group">
                            <label for="group_id" class="col-sm-2 control-label no-padding-right">所属模型</label>
                            <div class="col-sm-6">
                                    {volist name="modelRes" id="model"}
                                     {if condition="$modelFields['model_id'] eq $model['id']"} <span class="form-control">{$model.model_name}</span> 
                                     <input type="hidden" name="model_id" value="{$model.id}">
                                     {/if} 
                                    {/volist}                            </div>
                        </div> 

                        <div class="form-group">
                            <label for="username" class="col-sm-2 control-label no-padding-right">中文名</label>
                            <div class="col-sm-6">
                                <input class="form-control" placeholder="" name="field_cname" value="{$modelFields.field_cname}" required="" type="text">
                            </div>
                            <p class="help-block col-sm-4 red">* 必填</p>
                        </div>

                        <div class="form-group">
                            <label for="username" class="col-sm-2 control-label no-padding-right">英文名</label>
                            <div class="col-sm-6">
                                <input class="form-control" placeholder="" name="field_ename" required="" value="{$modelFields.field_ename}" type="text">
                            </div>
                            <p class="help-block col-sm-4 red">* 必填</p>
                        </div>
                        <!-- 字段类型：1：单行文本 2：单选安按钮 3：复选框 4：下拉菜单 5：文本域 6：附件 7：浮点 8：整型 9：长文本类型 longtext -->
                        <div class="form-group">
                            <label for="group_id" class="col-sm-2 control-label no-padding-right">字段类型</label>
                            <div class="col-sm-6">
                                <select name="field_type">
                                    <option value="1">单行文本</option>
                                    <option value="2">单选按钮</option>
                                    <option value="3">复选框</option>
                                    <option value="4">下拉菜单</option>
                                    <option value="5">文本域</option>
                                    <option value="6">附件</option>
                                    <option value="7">浮点</option>
                                    <option value="8">整型</option>
                                    <option value="9">长文本</option>
                                </select>
                            </div>
                            <p class="help-block col-sm-4 red">* 必选</p>
                        </div>  

                        <div class="form-group">
                            <label for="group_id" class="col-sm-2 control-label no-padding-right">可选值</label>
                            <div class="col-sm-6">
                                <textarea name="field_values" class="form-control"> {$modelFields.field_values} </textarea>
                            </div>
                            <p class="help-block col-sm-4 red">不同选项以 “,” 分割</p>
                        </div> 

                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-default">保存信息</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

                </div>
                <!-- /Page Body -->
            </div>
            <!-- /Page Content -->
		</div>	
	</div>

	    <!--Basic Scripts-->
    <script src="__ADMIN__/style/jquery_002.js"></script>
    <script src="__ADMIN__/style/bootstrap.js"></script>
    <!--Beyond Scripts-->
    <script src="__ADMIN__/style/beyond.js"></script>
    <script type="text/javascript">
    $("select[name='field_type']  option[value={$modelFields.field_type}]").attr('selected',true);
    </script>


</body></html>